home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gcc258s.zoo / gcc.info-11 < prev    next >
Encoding:
GNU Info File  |  1993-11-30  |  49.5 KB  |  1,159 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.54 from the input
  2. file gcc.texi.
  3.  
  4.    This file documents the use and the internals of the GNU compiler.
  5.  
  6.    Published by the Free Software Foundation 675 Massachusetts Avenue
  7. Cambridge, MA 02139 USA
  8.  
  9.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  10.  
  11.    Permission is granted to make and distribute verbatim copies of this
  12. manual provided the copyright notice and this permission notice are
  13. preserved on all copies.
  14.  
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided also
  17. that the sections entitled "GNU General Public License" and "Protect
  18. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  19. original, and provided that the entire resulting derived work is
  20. distributed under the terms of a permission notice identical to this
  21. one.
  22.  
  23.    Permission is granted to copy and distribute translations of this
  24. manual into another language, under the above conditions for modified
  25. versions, except that the sections entitled "GNU General Public
  26. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  27. permission notice, may be included in translations approved by the Free
  28. Software Foundation instead of in the original English.
  29.  
  30. File: gcc.info,  Node: Passes,  Next: RTL,  Prev: Interface,  Up: Top
  31.  
  32. Passes and Files of the Compiler
  33. ********************************
  34.  
  35.    The overall control structure of the compiler is in `toplev.c'.  This
  36. file is responsible for initialization, decoding arguments, opening and
  37. closing files, and sequencing the passes.
  38.  
  39.    The parsing pass is invoked only once, to parse the entire input.
  40. The RTL intermediate code for a function is generated as the function
  41. is parsed, a statement at a time.  Each statement is read in as a
  42. syntax tree and then converted to RTL; then the storage for the tree
  43. for the statement is reclaimed.  Storage for types (and the expressions
  44. for their sizes), declarations, and a representation of the binding
  45. contours and how they nest, remain until the function is finished being
  46. compiled; these are all needed to output the debugging information.
  47.  
  48.    Each time the parsing pass reads a complete function definition or
  49. top-level declaration, it calls either the function
  50. `rest_of_compilation', or the function `rest_of_decl_compilation' in
  51. `toplev.c', which are responsible for all further processing necessary,
  52. ending with output of the assembler language.  All other compiler
  53. passes run, in sequence, within `rest_of_compilation'.  When that
  54. function returns from compiling a function definition, the storage used
  55. for that function definition's compilation is entirely freed, unless it
  56. is an inline function (*note An Inline Function is As Fast As a Macro:
  57. Inline.).
  58.  
  59.    Here is a list of all the passes of the compiler and their source
  60. files.  Also included is a description of where debugging dumps can be
  61. requested with `-d' options.
  62.  
  63.    * Parsing.  This pass reads the entire text of a function definition,
  64.      constructing partial syntax trees.  This and RTL generation are no
  65.      longer truly separate passes (formerly they were), but it is
  66.      easier to think of them as separate.
  67.  
  68.      The tree representation does not entirely follow C syntax, because
  69.      it is intended to support other languages as well.
  70.  
  71.      Language-specific data type analysis is also done in this pass,
  72.      and every tree node that represents an expression has a data type
  73.      attached.  Variables are represented as declaration nodes.
  74.  
  75.      Constant folding and some arithmetic simplifications are also done
  76.      during this pass.
  77.  
  78.      The language-independent source files for parsing are
  79.      `stor-layout.c', `fold-const.c', and `tree.c'.  There are also
  80.      header files `tree.h' and `tree.def' which define the format of
  81.      the tree representation.
  82.  
  83.      The source files to parse C are `c-parse.in', `c-decl.c',
  84.      `c-typeck.c', `c-aux-info.c', `c-convert.c', and `c-lang.c' along
  85.      with header files `c-lex.h', and `c-tree.h'.
  86.  
  87.      The source files for parsing C++ are `cp-parse.y', `cp-class.c',
  88.      `cp-cvt.c', `cp-decl.c', `cp-decl2.c', `cp-dem.c', `cp-except.c',
  89.      `cp-expr.c', `cp-init.c', `cp-lex.c', `cp-method.c', `cp-ptree.c',
  90.      `cp-search.c', `cp-tree.c', `cp-type2.c', and `cp-typeck.c', along
  91.      with header files `cp-tree.def', `cp-tree.h', and `cp-decl.h'.
  92.  
  93.      The special source files for parsing Objective C are
  94.      `objc-parse.y', `objc-actions.c', `objc-tree.def', and
  95.      `objc-actions.h'.  Certain C-specific files are used for this as
  96.      well.
  97.  
  98.      The file `c-common.c' is also used for all of the above languages.
  99.  
  100.    * RTL generation.  This is the conversion of syntax tree into RTL
  101.      code.  It is actually done statement-by-statement during parsing,
  102.      but for most purposes it can be thought of as a separate pass.
  103.  
  104.      This is where the bulk of target-parameter-dependent code is found,
  105.      since often it is necessary for strategies to apply only when
  106.      certain standard kinds of instructions are available.  The purpose
  107.      of named instruction patterns is to provide this information to
  108.      the RTL generation pass.
  109.  
  110.      Optimization is done in this pass for `if'-conditions that are
  111.      comparisons, boolean operations or conditional expressions.  Tail
  112.      recursion is detected at this time also.  Decisions are made about
  113.      how best to arrange loops and how to output `switch' statements.
  114.  
  115.      The source files for RTL generation include `stmt.c', `calls.c',
  116.      `expr.c', `explow.c', `expmed.c', `function.c', `optabs.c' and
  117.      `emit-rtl.c'.  Also, the file `insn-emit.c', generated from the
  118.      machine description by the program `genemit', is used in this
  119.      pass.  The header file `expr.h' is used for communication within
  120.      this pass.
  121.  
  122.      The header files `insn-flags.h' and `insn-codes.h', generated from
  123.      the machine description by the programs `genflags' and `gencodes',
  124.      tell this pass which standard names are available for use and
  125.      which patterns correspond to them.
  126.  
  127.      Aside from debugging information output, none of the following
  128.      passes refers to the tree structure representation of the function
  129.      (only part of which is saved).
  130.  
  131.      The decision of whether the function can and should be expanded
  132.      inline in its subsequent callers is made at the end of rtl
  133.      generation.  The function must meet certain criteria, currently
  134.      related to the size of the function and the types and number of
  135.      parameters it has.  Note that this function may contain loops,
  136.      recursive calls to itself (tail-recursive functions can be
  137.      inlined!), gotos, in short, all constructs supported by GNU CC.
  138.      The file `integrate.c' contains the code to save a function's rtl
  139.      for later inlining and to inline that rtl when the function is
  140.      called.  The header file `integrate.h' is also used for this
  141.      purpose.
  142.  
  143.      The option `-dr' causes a debugging dump of the RTL code after
  144.      this pass.  This dump file's name is made by appending `.rtl' to
  145.      the input file name.
  146.  
  147.    * Jump optimization.  This pass simplifies jumps to the following
  148.      instruction, jumps across jumps, and jumps to jumps.  It deletes
  149.      unreferenced labels and unreachable code, except that unreachable
  150.      code that contains a loop is not recognized as unreachable in this
  151.      pass.  (Such loops are deleted later in the basic block analysis.)
  152.      It also converts some code originally written with jumps into
  153.      sequences of instructions that directly set values from the
  154.      results of comparisons, if the machine has such instructions.
  155.  
  156.      Jump optimization is performed two or three times.  The first time
  157.      is immediately following RTL generation.  The second time is after
  158.      CSE, but only if CSE says repeated jump optimization is needed.
  159.      The last time is right before the final pass.  That time,
  160.      cross-jumping and deletion of no-op move instructions are done
  161.      together with the optimizations described above.
  162.  
  163.      The source file of this pass is `jump.c'.
  164.  
  165.      The option `-dj' causes a debugging dump of the RTL code after
  166.      this pass is run for the first time.  This dump file's name is
  167.      made by appending `.jump' to the input file name.
  168.  
  169.    * Register scan.  This pass finds the first and last use of each
  170.      register, as a guide for common subexpression elimination.  Its
  171.      source is in `regclass.c'.
  172.  
  173.    * Jump threading.  This pass detects a condition jump that branches
  174.      to an identical or inverse test.  Such jumps can be `threaded'
  175.      through the second conditional test.  The source code for this
  176.      pass is in `jump.c'.  This optimization is only performed if
  177.      `-fthread-jumps' is enabled.
  178.  
  179.    * Common subexpression elimination.  This pass also does constant
  180.      propagation.  Its source file is `cse.c'.  If constant propagation
  181.      causes conditional jumps to become unconditional or to become
  182.      no-ops, jump optimization is run again when CSE is finished.
  183.  
  184.      The option `-ds' causes a debugging dump of the RTL code after
  185.      this pass.  This dump file's name is made by appending `.cse' to
  186.      the input file name.
  187.  
  188.    * Loop optimization.  This pass moves constant expressions out of
  189.      loops, and optionally does strength-reduction and loop unrolling
  190.      as well.  Its source files are `loop.c' and `unroll.c', plus the
  191.      header `loop.h' used for communication between them.  Loop
  192.      unrolling uses some functions in `integrate.c' and the header
  193.      `integrate.h'.
  194.  
  195.      The option `-dL' causes a debugging dump of the RTL code after
  196.      this pass.  This dump file's name is made by appending `.loop' to
  197.      the input file name.
  198.  
  199.    * If `-frerun-cse-after-loop' was enabled, a second common
  200.      subexpression elimination pass is performed after the loop
  201.      optimization pass.  Jump threading is also done again at this time
  202.      if it was specified.
  203.  
  204.      The option `-dt' causes a debugging dump of the RTL code after
  205.      this pass.  This dump file's name is made by appending `.cse2' to
  206.      the input file name.
  207.  
  208.    * Stupid register allocation is performed at this point in a
  209.      nonoptimizing compilation.  It does a little data flow analysis as
  210.      well.  When stupid register allocation is in use, the next pass
  211.      executed is the reloading pass; the others in between are skipped.
  212.      The source file is `stupid.c'.
  213.  
  214.    * Data flow analysis (`flow.c').  This pass divides the program into
  215.      basic blocks (and in the process deletes unreachable loops); then
  216.      it computes which pseudo-registers are live at each point in the
  217.      program, and makes the first instruction that uses a value point at
  218.      the instruction that computed the value.
  219.  
  220.      This pass also deletes computations whose results are never used,
  221.      and combines memory references with add or subtract instructions
  222.      to make autoincrement or autodecrement addressing.
  223.  
  224.      The option `-df' causes a debugging dump of the RTL code after
  225.      this pass.  This dump file's name is made by appending `.flow' to
  226.      the input file name.  If stupid register allocation is in use, this
  227.      dump file reflects the full results of such allocation.
  228.  
  229.    * Instruction combination (`combine.c').  This pass attempts to
  230.      combine groups of two or three instructions that are related by
  231.      data flow into single instructions.  It combines the RTL
  232.      expressions for the instructions by substitution, simplifies the
  233.      result using algebra, and then attempts to match the result
  234.      against the machine description.
  235.  
  236.      The option `-dc' causes a debugging dump of the RTL code after
  237.      this pass.  This dump file's name is made by appending `.combine'
  238.      to the input file name.
  239.  
  240.    * Instruction scheduling (`sched.c').  This pass looks for
  241.      instructions whose output will not be available by the time that
  242.      it is used in subsequent instructions.  (Memory loads and floating
  243.      point instructions often have this behavior on RISC machines).  It
  244.      re-orders instructions within a basic block to try to separate the
  245.      definition and use of items that otherwise would cause pipeline
  246.      stalls.
  247.  
  248.      Instruction scheduling is performed twice.  The first time is
  249.      immediately after instruction combination and the second is
  250.      immediately after reload.
  251.  
  252.      The option `-dS' causes a debugging dump of the RTL code after this
  253.      pass is run for the first time.  The dump file's name is made by
  254.      appending `.sched' to the input file name.
  255.  
  256.    * Register class preferencing.  The RTL code is scanned to find out
  257.      which register class is best for each pseudo register.  The source
  258.      file is `regclass.c'.
  259.  
  260.    * Local register allocation (`local-alloc.c').  This pass allocates
  261.      hard registers to pseudo registers that are used only within one
  262.      basic block.  Because the basic block is linear, it can use fast
  263.      and powerful techniques to do a very good job.
  264.  
  265.      The option `-dl' causes a debugging dump of the RTL code after
  266.      this pass.  This dump file's name is made by appending `.lreg' to
  267.      the input file name.
  268.  
  269.    * Global register allocation (`global.c').  This pass allocates hard
  270.      registers for the remaining pseudo registers (those whose life
  271.      spans are not contained in one basic block).
  272.  
  273.    * Reloading.  This pass renumbers pseudo registers with the hardware
  274.      registers numbers they were allocated.  Pseudo registers that did
  275.      not get hard registers are replaced with stack slots.  Then it
  276.      finds instructions that are invalid because a value has failed to
  277.      end up in a register, or has ended up in a register of the wrong
  278.      kind.  It fixes up these instructions by reloading the
  279.      problematical values temporarily into registers.  Additional
  280.      instructions are generated to do the copying.
  281.  
  282.      The reload pass also optionally eliminates the frame pointer and
  283.      inserts instructions to save and restore call-clobbered registers
  284.      around calls.
  285.  
  286.      Source files are `reload.c' and `reload1.c', plus the header
  287.      `reload.h' used for communication between them.
  288.  
  289.      The option `-dg' causes a debugging dump of the RTL code after
  290.      this pass.  This dump file's name is made by appending `.greg' to
  291.      the input file name.
  292.  
  293.    * Instruction scheduling is repeated here to try to avoid pipeline
  294.      stalls due to memory loads generated for spilled pseudo registers.
  295.  
  296.      The option `-dR' causes a debugging dump of the RTL code after
  297.      this pass.  This dump file's name is made by appending `.sched2'
  298.      to the input file name.
  299.  
  300.    * Jump optimization is repeated, this time including cross-jumping
  301.      and deletion of no-op move instructions.
  302.  
  303.      The option `-dJ' causes a debugging dump of the RTL code after
  304.      this pass.  This dump file's name is made by appending `.jump2' to
  305.      the input file name.
  306.  
  307.    * Delayed branch scheduling.  This optional pass attempts to find
  308.      instructions that can go into the delay slots of other
  309.      instructions, usually jumps and calls.  The source file name is
  310.      `reorg.c'.
  311.  
  312.      The option `-dd' causes a debugging dump of the RTL code after
  313.      this pass.  This dump file's name is made by appending `.dbr' to
  314.      the input file name.
  315.  
  316.    * Conversion from usage of some hard registers to usage of a register
  317.      stack may be done at this point.  Currently, this is supported only
  318.      for the floating-point registers of the Intel 80387 coprocessor.
  319.      The source file name is `reg-stack.c'.
  320.  
  321.      The options `-dk' causes a debugging dump of the RTL code after
  322.      this pass.  This dump file's name is made by appending `.stack' to
  323.      the input file name.
  324.  
  325.    * Final.  This pass outputs the assembler code for the function.  It
  326.      is also responsible for identifying spurious test and compare
  327.      instructions.  Machine-specific peephole optimizations are
  328.      performed at the same time.  The function entry and exit sequences
  329.      are generated directly as assembler code in this pass; they never
  330.      exist as RTL.
  331.  
  332.      The source files are `final.c' plus `insn-output.c'; the latter is
  333.      generated automatically from the machine description by the tool
  334.      `genoutput'.  The header file `conditions.h' is used for
  335.      communication between these files.
  336.  
  337.    * Debugging information output.  This is run after final because it
  338.      must output the stack slot offsets for pseudo registers that did
  339.      not get hard registers.  Source files are `dbxout.c' for DBX
  340.      symbol table format, `sdbout.c' for SDB symbol table format, and
  341.      `dwarfout.c' for DWARF symbol table format.
  342.  
  343.    Some additional files are used by all or many passes:
  344.  
  345.    * Every pass uses `machmode.def' and `machmode.h' which define the
  346.      machine modes.
  347.  
  348.    * Several passes use `real.h', which defines the default
  349.      representation of floating point constants and how to operate on
  350.      them.
  351.  
  352.    * All the passes that work with RTL use the header files `rtl.h' and
  353.      `rtl.def', and subroutines in file `rtl.c'.  The tools `gen*' also
  354.      use these files to read and work with the machine description RTL.
  355.  
  356.    * Several passes refer to the header file `insn-config.h' which
  357.      contains a few parameters (C macro definitions) generated
  358.      automatically from the machine description RTL by the tool
  359.      `genconfig'.
  360.  
  361.    * Several passes use the instruction recognizer, which consists of
  362.      `recog.c' and `recog.h', plus the files `insn-recog.c' and
  363.      `insn-extract.c' that are generated automatically from the machine
  364.      description by the tools `genrecog' and `genextract'.
  365.  
  366.    * Several passes use the header files `regs.h' which defines the
  367.      information recorded about pseudo register usage, and
  368.      `basic-block.h' which defines the information recorded about basic
  369.      blocks.
  370.  
  371.    * `hard-reg-set.h' defines the type `HARD_REG_SET', a bit-vector
  372.      with a bit for each hard register, and some macros to manipulate
  373.      it.  This type is just `int' if the machine has few enough hard
  374.      registers; otherwise it is an array of `int' and some of the
  375.      macros expand into loops.
  376.  
  377.    * Several passes use instruction attributes.  A definition of the
  378.      attributes defined for a particular machine is in file
  379.      `insn-attr.h', which is generated from the machine description by
  380.      the program `genattr'.  The file `insn-attrtab.c' contains
  381.      subroutines to obtain the attribute values for insns.  It is
  382.      generated from the machine description by the program `genattrtab'.
  383.  
  384. File: gcc.info,  Node: RTL,  Next: Machine Desc,  Prev: Passes,  Up: Top
  385.  
  386. RTL Representation
  387. ******************
  388.  
  389.    Most of the work of the compiler is done on an intermediate
  390. representation called register transfer language.  In this language,
  391. the instructions to be output are described, pretty much one by one, in
  392. an algebraic form that describes what the instruction does.
  393.  
  394.    RTL is inspired by Lisp lists.  It has both an internal form, made
  395. up of structures that point at other structures, and a textual form
  396. that is used in the machine description and in printed debugging dumps.
  397. The textual form uses nested parentheses to indicate the pointers in
  398. the internal form.
  399.  
  400. * Menu:
  401.  
  402. * RTL Objects::       Expressions vs vectors vs strings vs integers.
  403. * Accessors::         Macros to access expression operands or vector elts.
  404. * Flags::             Other flags in an RTL expression.
  405. * Machine Modes::     Describing the size and format of a datum.
  406. * Constants::         Expressions with constant values.
  407. * Regs and Memory::   Expressions representing register contents or memory.
  408. * Arithmetic::        Expressions representing arithmetic on other expressions.
  409. * Comparisons::       Expressions representing comparison of expressions.
  410. * Bit Fields::        Expressions representing bitfields in memory or reg.
  411. * Conversions::       Extending, truncating, floating or fixing.
  412. * RTL Declarations::  Declaring volatility, constancy, etc.
  413. * Side Effects::      Expressions for storing in registers, etc.
  414. * Incdec::            Embedded side-effects for autoincrement addressing.
  415. * Assembler::         Representing `asm' with operands.
  416. * Insns::             Expression types for entire insns.
  417. * Calls::             RTL representation of function call insns.
  418. * Sharing::           Some expressions are unique; others *must* be copied.
  419. * Reading RTL::       Reading textual RTL from a file.
  420.  
  421. File: gcc.info,  Node: RTL Objects,  Next: Accessors,  Prev: RTL,  Up: RTL
  422.  
  423. RTL Object Types
  424. ================
  425.  
  426.    RTL uses five kinds of objects: expressions, integers, wide integers,
  427. strings and vectors.  Expressions are the most important ones.  An RTL
  428. expression ("RTX", for short) is a C structure, but it is usually
  429. referred to with a pointer; a type that is given the typedef name `rtx'.
  430.  
  431.    An integer is simply an `int'; their written form uses decimal
  432. digits.  A wide integer is an integral object whose type is
  433. `HOST_WIDE_INT' (*note Config::.); their written form uses decimal
  434. digits.
  435.  
  436.    A string is a sequence of characters.  In core it is represented as a
  437. `char *' in usual C fashion, and it is written in C syntax as well.
  438. However, strings in RTL may never be null.  If you write an empty
  439. string in a machine description, it is represented in core as a null
  440. pointer rather than as a pointer to a null character.  In certain
  441. contexts, these null pointers instead of strings are valid.  Within RTL
  442. code, strings are most commonly found inside `symbol_ref' expressions,
  443. but they appear in other contexts in the RTL expressions that make up
  444. machine descriptions.
  445.  
  446.    A vector contains an arbitrary number of pointers to expressions.
  447. The number of elements in the vector is explicitly present in the
  448. vector.  The written form of a vector consists of square brackets
  449. (`[...]') surrounding the elements, in sequence and with whitespace
  450. separating them.  Vectors of length zero are not created; null pointers
  451. are used instead.
  452.  
  453.    Expressions are classified by "expression codes" (also called RTX
  454. codes).  The expression code is a name defined in `rtl.def', which is
  455. also (in upper case) a C enumeration constant.  The possible expression
  456. codes and their meanings are machine-independent.  The code of an RTX
  457. can be extracted with the macro `GET_CODE (X)' and altered with
  458. `PUT_CODE (X, NEWCODE)'.
  459.  
  460.    The expression code determines how many operands the expression
  461. contains, and what kinds of objects they are.  In RTL, unlike Lisp, you
  462. cannot tell by looking at an operand what kind of object it is.
  463. Instead, you must know from its context--from the expression code of
  464. the containing expression.  For example, in an expression of code
  465. `subreg', the first operand is to be regarded as an expression and the
  466. second operand as an integer.  In an expression of code `plus', there
  467. are two operands, both of which are to be regarded as expressions.  In
  468. a `symbol_ref' expression, there is one operand, which is to be
  469. regarded as a string.
  470.  
  471.    Expressions are written as parentheses containing the name of the
  472. expression type, its flags and machine mode if any, and then the
  473. operands of the expression (separated by spaces).
  474.  
  475.    Expression code names in the `md' file are written in lower case,
  476. but when they appear in C code they are written in upper case.  In this
  477. manual, they are shown as follows: `const_int'.
  478.  
  479.    In a few contexts a null pointer is valid where an expression is
  480. normally wanted.  The written form of this is `(nil)'.
  481.  
  482. File: gcc.info,  Node: Accessors,  Next: Flags,  Prev: RTL Objects,  Up: RTL
  483.  
  484. Access to Operands
  485. ==================
  486.  
  487.    For each expression type `rtl.def' specifies the number of contained
  488. objects and their kinds, with four possibilities: `e' for expression
  489. (actually a pointer to an expression), `i' for integer, `w' for wide
  490. integer, `s' for string, and `E' for vector of expressions.  The
  491. sequence of letters for an expression code is called its "format".
  492. Thus, the format of `subreg' is `ei'.
  493.  
  494.    A few other format characters are used occasionally:
  495.  
  496. `u'
  497.      `u' is equivalent to `e' except that it is printed differently in
  498.      debugging dumps.  It is used for pointers to insns.
  499.  
  500. `n'
  501.      `n' is equivalent to `i' except that it is printed differently in
  502.      debugging dumps.  It is used for the line number or code number of
  503.      a `note' insn.
  504.  
  505. `S'
  506.      `S' indicates a string which is optional.  In the RTL objects in
  507.      core, `S' is equivalent to `s', but when the object is read, from
  508.      an `md' file, the string value of this operand may be omitted.  An
  509.      omitted string is taken to be the null string.
  510.  
  511. `V'
  512.      `V' indicates a vector which is optional.  In the RTL objects in
  513.      core, `V' is equivalent to `E', but when the object is read from
  514.      an `md' file, the vector value of this operand may be omitted.  An
  515.      omitted vector is effectively the same as a vector of no elements.
  516.  
  517. `0'
  518.      `0' means a slot whose contents do not fit any normal category.
  519.      `0' slots are not printed at all in dumps, and are often used in
  520.      special ways by small parts of the compiler.
  521.  
  522.    There are macros to get the number of operands, the format, and the
  523. class of an expression code:
  524.  
  525. `GET_RTX_LENGTH (CODE)'
  526.      Number of operands of an RTX of code CODE.
  527.  
  528. `GET_RTX_FORMAT (CODE)'
  529.      The format of an RTX of code CODE, as a C string.
  530.  
  531. `GET_RTX_CLASS (CODE)'
  532.      A single character representing the type of RTX operation that code
  533.      CODE performs.
  534.  
  535.      The following classes are defined:
  536.  
  537.     `o'
  538.           An RTX code that represents an actual object, such as `reg' or
  539.           `mem'.  `subreg' is not in this class.
  540.  
  541.     `<'
  542.           An RTX code for a comparison.  The codes in this class are
  543.           `NE', `EQ', `LE', `LT', `GE', `GT', `LEU', `LTU', `GEU',
  544.           `GTU'.
  545.  
  546.     `1'
  547.           An RTX code for a unary arithmetic operation, such as `neg'.
  548.  
  549.     `c'
  550.           An RTX code for a commutative binary operation, other than
  551.           `NE' and `EQ' (which have class `<').
  552.  
  553.     `2'
  554.           An RTX code for a noncommutative binary operation, such as
  555.           `MINUS'.
  556.  
  557.     `b'
  558.           An RTX code for a bitfield operation, either `ZERO_EXTRACT' or
  559.           `SIGN_EXTRACT'.
  560.  
  561.     `3'
  562.           An RTX code for other three input operations, such as
  563.           `IF_THEN_ELSE'.
  564.  
  565.     `i'
  566.           An RTX code for a machine insn (`INSN', `JUMP_INSN', and
  567.           `CALL_INSN').
  568.  
  569.     `m'
  570.           An RTX code for something that matches in insns, such as
  571.           `MATCH_DUP'.
  572.  
  573.     `x'
  574.           All other RTX codes.
  575.  
  576.    Operands of expressions are accessed using the macros `XEXP',
  577. `XINT', `XWINT' and `XSTR'.  Each of these macros takes two arguments:
  578. an expression-pointer (RTX) and an operand number (counting from zero).
  579. Thus,
  580.  
  581.      XEXP (X, 2)
  582.  
  583. accesses operand 2 of expression X, as an expression.
  584.  
  585.      XINT (X, 2)
  586.  
  587. accesses the same operand as an integer.  `XSTR', used in the same
  588. fashion, would access it as a string.
  589.  
  590.    Any operand can be accessed as an integer, as an expression or as a
  591. string.  You must choose the correct method of access for the kind of
  592. value actually stored in the operand.  You would do this based on the
  593. expression code of the containing expression.  That is also how you
  594. would know how many operands there are.
  595.  
  596.    For example, if X is a `subreg' expression, you know that it has two
  597. operands which can be correctly accessed as `XEXP (X, 0)' and `XINT (X,
  598. 1)'.  If you did `XINT (X, 0)', you would get the address of the
  599. expression operand but cast as an integer; that might occasionally be
  600. useful, but it would be cleaner to write `(int) XEXP (X, 0)'.  `XEXP
  601. (X, 1)' would also compile without error, and would return the second,
  602. integer operand cast as an expression pointer, which would probably
  603. result in a crash when accessed.  Nothing stops you from writing `XEXP
  604. (X, 28)' either, but this will access memory past the end of the
  605. expression with unpredictable results.
  606.  
  607.    Access to operands which are vectors is more complicated.  You can
  608. use the macro `XVEC' to get the vector-pointer itself, or the macros
  609. `XVECEXP' and `XVECLEN' to access the elements and length of a vector.
  610.  
  611. `XVEC (EXP, IDX)'
  612.      Access the vector-pointer which is operand number IDX in EXP.
  613.  
  614. `XVECLEN (EXP, IDX)'
  615.      Access the length (number of elements) in the vector which is in
  616.      operand number IDX in EXP.  This value is an `int'.
  617.  
  618. `XVECEXP (EXP, IDX, ELTNUM)'
  619.      Access element number ELTNUM in the vector which is in operand
  620.      number IDX in EXP.  This value is an RTX.
  621.  
  622.      It is up to you to make sure that ELTNUM is not negative and is
  623.      less than `XVECLEN (EXP, IDX)'.
  624.  
  625.    All the macros defined in this section expand into lvalues and
  626. therefore can be used to assign the operands, lengths and vector
  627. elements as well as to access them.
  628.  
  629. File: gcc.info,  Node: Flags,  Next: Machine Modes,  Prev: Accessors,  Up: RTL
  630.  
  631. Flags in an RTL Expression
  632. ==========================
  633.  
  634.    RTL expressions contain several flags (one-bit bitfields) that are
  635. used in certain types of expression.  Most often they are accessed with
  636. the following macros:
  637.  
  638. `MEM_VOLATILE_P (X)'
  639.      In `mem' expressions, nonzero for volatile memory references.
  640.      Stored in the `volatil' field and printed as `/v'.
  641.  
  642. `MEM_IN_STRUCT_P (X)'
  643.      In `mem' expressions, nonzero for reference to an entire
  644.      structure, union or array, or to a component of one.  Zero for
  645.      references to a scalar variable or through a pointer to a scalar.
  646.      Stored in the `in_struct' field and printed as `/s'.
  647.  
  648. `REG_LOOP_TEST_P'
  649.      In `reg' expressions, nonzero if this register's entire life is
  650.      contained in the exit test code for some loop.  Stored in the
  651.      `in_struct' field and printed as `/s'.
  652.  
  653. `REG_USERVAR_P (X)'
  654.      In a `reg', nonzero if it corresponds to a variable present in the
  655.      user's source code.  Zero for temporaries generated internally by
  656.      the compiler.  Stored in the `volatil' field and printed as `/v'.
  657.  
  658. `REG_FUNCTION_VALUE_P (X)'
  659.      Nonzero in a `reg' if it is the place in which this function's
  660.      value is going to be returned.  (This happens only in a hard
  661.      register.)  Stored in the `integrated' field and printed as `/i'.
  662.  
  663.      The same hard register may be used also for collecting the values
  664.      of functions called by this one, but `REG_FUNCTION_VALUE_P' is zero
  665.      in this kind of use.
  666.  
  667. `SUBREG_PROMOTED_VAR_P'
  668.      Nonzero in a `subreg' if it was made when accessing an object that
  669.      was promoted to a wider mode in accord with the `PROMOTED_MODE'
  670.      machine description macro (*note Storage Layout::.).  In this
  671.      case, the mode of the `subreg' is the declared mode of the object
  672.      and the mode of `SUBREG_REG' is the mode of the register that
  673.      holds the object.  Promoted variables are always either sign- or
  674.      zero-extended to the wider mode on every assignment.  Stored in
  675.      the `in_struct' field and printed as `/s'.
  676.  
  677. `SUBREG_PROMOTED_UNSIGNED_P'
  678.      Nonzero in a `subreg' that has `SUBREG_PROMOTED_VAR_P' nonzero if
  679.      the object being referenced is kept zero-extended and zero if it
  680.      is kept sign-extended.  Stored in the `unchanging' field and
  681.      printed as `/u'.
  682.  
  683. `RTX_UNCHANGING_P (X)'
  684.      Nonzero in a `reg' or `mem' if the value is not changed.  (This
  685.      flag is not set for memory references via pointers to constants.
  686.      Such pointers only guarantee that the object will not be changed
  687.      explicitly by the current function.  The object might be changed by
  688.      other functions or by aliasing.)  Stored in the `unchanging' field
  689.      and printed as `/u'.
  690.  
  691. `RTX_INTEGRATED_P (INSN)'
  692.      Nonzero in an insn if it resulted from an in-line function call.
  693.      Stored in the `integrated' field and printed as `/i'.  This may be
  694.      deleted; nothing currently depends on it.
  695.  
  696. `SYMBOL_REF_USED (X)'
  697.      In a `symbol_ref', indicates that X has been used.  This is
  698.      normally only used to ensure that X is only declared external
  699.      once.  Stored in the `used' field.
  700.  
  701. `SYMBOL_REF_FLAG (X)'
  702.      In a `symbol_ref', this is used as a flag for machine-specific
  703.      purposes.  Stored in the `volatil' field and printed as `/v'.
  704.  
  705. `LABEL_OUTSIDE_LOOP_P'
  706.      In `label_ref' expressions, nonzero if this is a reference to a
  707.      label that is outside the innermost loop containing the reference
  708.      to the label.  Stored in the `in_struct' field and printed as `/s'.
  709.  
  710. `INSN_DELETED_P (INSN)'
  711.      In an insn, nonzero if the insn has been deleted.  Stored in the
  712.      `volatil' field and printed as `/v'.
  713.  
  714. `INSN_ANNULLED_BRANCH_P (INSN)'
  715.      In an `insn' in the delay slot of a branch insn, indicates that an
  716.      annulling branch should be used.  See the discussion under
  717.      `sequence' below.  Stored in the `unchanging' field and printed as
  718.      `/u'.
  719.  
  720. `INSN_FROM_TARGET_P (INSN)'
  721.      In an `insn' in a delay slot of a branch, indicates that the insn
  722.      is from the target of the branch.  If the branch insn has
  723.      `INSN_ANNULLED_BRANCH_P' set, this insn should only be executed if
  724.      the branch is taken.  For annulled branches with this bit clear,
  725.      the insn should be executed only if the branch is not taken.
  726.      Stored in the `in_struct' field and printed as `/s'.
  727.  
  728. `CONSTANT_POOL_ADDRESS_P (X)'
  729.      Nonzero in a `symbol_ref' if it refers to part of the current
  730.      function's "constants pool".  These are addresses close to the
  731.      beginning of the function, and GNU CC assumes they can be addressed
  732.      directly (perhaps with the help of base registers).  Stored in the
  733.      `unchanging' field and printed as `/u'.
  734.  
  735. `CONST_CALL_P (X)'
  736.      In a `call_insn', indicates that the insn represents a call to a
  737.      const function.  Stored in the `unchanging' field and printed as
  738.      `/u'.
  739.  
  740. `LABEL_PRESERVE_P (X)'
  741.      In a `code_label', indicates that the label can never be deleted.
  742.      Labels referenced by a non-local goto will have this bit set.
  743.      Stored in the `in_struct' field and printed as `/s'.
  744.  
  745. `SCHED_GROUP_P (INSN)'
  746.      During instruction scheduling, in an insn, indicates that the
  747.      previous insn must be scheduled together with this insn.  This is
  748.      used to ensure that certain groups of instructions will not be
  749.      split up by the instruction scheduling pass, for example, `use'
  750.      insns before a `call_insn' may not be separated from the
  751.      `call_insn'.  Stored in the `in_struct' field and printed as `/s'.
  752.  
  753.    These are the fields which the above macros refer to:
  754.  
  755. `used'
  756.      Normally, this flag is used only momentarily, at the end of RTL
  757.      generation for a function, to count the number of times an
  758.      expression appears in insns.  Expressions that appear more than
  759.      once are copied, according to the rules for shared structure
  760.      (*note Sharing::.).
  761.  
  762.      In a `symbol_ref', it indicates that an external declaration for
  763.      the symbol has already been written.
  764.  
  765.      In a `reg', it is used by the leaf register renumbering code to
  766.      ensure that each register is only renumbered once.
  767.  
  768. `volatil'
  769.      This flag is used in `mem', `symbol_ref' and `reg' expressions and
  770.      in insns.  In RTL dump files, it is printed as `/v'.
  771.  
  772.      In a `mem' expression, it is 1 if the memory reference is volatile.
  773.      Volatile memory references may not be deleted, reordered or
  774.      combined.
  775.  
  776.      In a `symbol_ref' expression, it is used for machine-specific
  777.      purposes.
  778.  
  779.      In a `reg' expression, it is 1 if the value is a user-level
  780.      variable.  0 indicates an internal compiler temporary.
  781.  
  782.      In an insn, 1 means the insn has been deleted.
  783.  
  784. `in_struct'
  785.      In `mem' expressions, it is 1 if the memory datum referred to is
  786.      all or part of a structure or array; 0 if it is (or might be) a
  787.      scalar variable.  A reference through a C pointer has 0 because
  788.      the pointer might point to a scalar variable.  This information
  789.      allows the compiler to determine something about possible cases of
  790.      aliasing.
  791.  
  792.      In an insn in the delay slot of a branch, 1 means that this insn
  793.      is from the target of the branch.
  794.  
  795.      During instruction scheduling, in an insn, 1 means that this insn
  796.      must be scheduled as part of a group together with the previous
  797.      insn.
  798.  
  799.      In `reg' expressions, it is 1 if the register has its entire life
  800.      contained within the test expression of some loop.
  801.  
  802.      In `subreg' expressions, 1 means that the `subreg' is accessing an
  803.      object that has had its mode promoted from a wider mode.
  804.  
  805.      In `label_ref' expressions, 1 means that the referenced label is
  806.      outside the innermost loop containing the insn in which the
  807.      `label_ref' was found.
  808.  
  809.      In `code_label' expressions, it is 1 if the label may never be
  810.      deleted.  This is used for labels which are the target of
  811.      non-local gotos.
  812.  
  813.      In an RTL dump, this flag is represented as `/s'.
  814.  
  815. `unchanging'
  816.      In `reg' and `mem' expressions, 1 means that the value of the
  817.      expression never changes.
  818.  
  819.      In `subreg' expressions, it is 1 if the `subreg' references an
  820.      unsigned object whose mode has been promoted to a wider mode.
  821.  
  822.      In an insn, 1 means that this is an annulling branch.
  823.  
  824.      In a `symbol_ref' expression, 1 means that this symbol addresses
  825.      something in the per-function constants pool.
  826.  
  827.      In a `call_insn', 1 means that this instruction is a call to a
  828.      const function.
  829.  
  830.      In an RTL dump, this flag is represented as `/u'.
  831.  
  832. `integrated'
  833.      In some kinds of expressions, including insns, this flag means the
  834.      rtl was produced by procedure integration.
  835.  
  836.      In a `reg' expression, this flag indicates the register containing
  837.      the value to be returned by the current function.  On machines
  838.      that pass parameters in registers, the same register number may be
  839.      used for parameters as well, but this flag is not set on such uses.
  840.  
  841. File: gcc.info,  Node: Machine Modes,  Next: Constants,  Prev: Flags,  Up: RTL
  842.  
  843. Machine Modes
  844. =============
  845.  
  846.    A machine mode describes a size of data object and the
  847. representation used for it.  In the C code, machine modes are
  848. represented by an enumeration type, `enum machine_mode', defined in
  849. `machmode.def'.  Each RTL expression has room for a machine mode and so
  850. do certain kinds of tree expressions (declarations and types, to be
  851. precise).
  852.  
  853.    In debugging dumps and machine descriptions, the machine mode of an
  854. RTL expression is written after the expression code with a colon to
  855. separate them.  The letters `mode' which appear at the end of each
  856. machine mode name are omitted.  For example, `(reg:SI 38)' is a `reg'
  857. expression with machine mode `SImode'.  If the mode is `VOIDmode', it
  858. is not written at all.
  859.  
  860.    Here is a table of machine modes.  The term "byte" below refers to an
  861. object of `BITS_PER_UNIT' bits (*note Storage Layout::.).
  862.  
  863. `QImode'
  864.      "Quarter-Integer" mode represents a single byte treated as an
  865.      integer.
  866.  
  867. `HImode'
  868.      "Half-Integer" mode represents a two-byte integer.
  869.  
  870. `PSImode'
  871.      "Partial Single Integer" mode represents an integer which occupies
  872.      four bytes but which doesn't really use all four.  On some
  873.      machines, this is the right mode to use for pointers.
  874.  
  875. `SImode'
  876.      "Single Integer" mode represents a four-byte integer.
  877.  
  878. `PDImode'
  879.      "Partial Double Integer" mode represents an integer which occupies
  880.      eight bytes but which doesn't really use all eight.  On some
  881.      machines, this is the right mode to use for certain pointers.
  882.  
  883. `DImode'
  884.      "Double Integer" mode represents an eight-byte integer.
  885.  
  886. `TImode'
  887.      "Tetra Integer" (?) mode represents a sixteen-byte integer.
  888.  
  889. `SFmode'
  890.      "Single Floating" mode represents a single-precision (four byte)
  891.      floating point number.
  892.  
  893. `DFmode'
  894.      "Double Floating" mode represents a double-precision (eight byte)
  895.      floating point number.
  896.  
  897. `XFmode'
  898.      "Extended Floating" mode represents a triple-precision (twelve
  899.      byte) floating point number.  This mode is used for IEEE extended
  900.      floating point.
  901.  
  902. `TFmode'
  903.      "Tetra Floating" mode represents a quadruple-precision (sixteen
  904.      byte) floating point number.
  905.  
  906. `CCmode'
  907.      "Condition Code" mode represents the value of a condition code,
  908.      which is a machine-specific set of bits used to represent the
  909.      result of a comparison operation.  Other machine-specific modes
  910.      may also be used for the condition code.  These modes are not used
  911.      on machines that use `cc0' (see *note Condition Code::.).
  912.  
  913. `BLKmode'
  914.      "Block" mode represents values that are aggregates to which none of
  915.      the other modes apply.  In RTL, only memory references can have
  916.      this mode, and only if they appear in string-move or vector
  917.      instructions.  On machines which have no such instructions,
  918.      `BLKmode' will not appear in RTL.
  919.  
  920. `VOIDmode'
  921.      Void mode means the absence of a mode or an unspecified mode.  For
  922.      example, RTL expressions of code `const_int' have mode `VOIDmode'
  923.      because they can be taken to have whatever mode the context
  924.      requires.  In debugging dumps of RTL, `VOIDmode' is expressed by
  925.      the absence of any mode.
  926.  
  927. `SCmode, DCmode, XCmode, TCmode'
  928.      These modes stand for a complex number represented as a pair of
  929.      floating point values.  The floating point values are in `SFmode',
  930.      `DFmode', `XFmode', and `TFmode', respectively.
  931.  
  932. `CQImode, CHImode, CSImode, CDImode, CTImode, COImode'
  933.      These modes stand for a complex number represented as a pair of
  934.      integer values.  The integer values are in `QImode', `HImode',
  935.      `SImode', `DImode', `TImode', and `OImode', respectively.
  936.  
  937.    The machine description defines `Pmode' as a C macro which expands
  938. into the machine mode used for addresses.  Normally this is the mode
  939. whose size is `BITS_PER_WORD', `SImode' on 32-bit machines.
  940.  
  941.    The only modes which a machine description must support are
  942. `QImode', and the modes corresponding to `BITS_PER_WORD',
  943. `FLOAT_TYPE_SIZE' and `DOUBLE_TYPE_SIZE'.  The compiler will attempt to
  944. use `DImode' for 8-byte structures and unions, but this can be
  945. prevented by overriding the definition of `MAX_FIXED_MODE_SIZE'.
  946. Alternatively, you can have the compiler use `TImode' for 16-byte
  947. structures and unions.  Likewise, you can arrange for the C type `short
  948. int' to avoid using `HImode'.
  949.  
  950.    Very few explicit references to machine modes remain in the compiler
  951. and these few references will soon be removed.  Instead, the machine
  952. modes are divided into mode classes.  These are represented by the
  953. enumeration type `enum mode_class' defined in `machmode.h'.  The
  954. possible mode classes are:
  955.  
  956. `MODE_INT'
  957.      Integer modes.  By default these are `QImode', `HImode', `SImode',
  958.      `DImode', and `TImode'.
  959.  
  960. `MODE_PARTIAL_INT'
  961.      The "partial integer" modes, `PSImode' and `PDImode'.
  962.  
  963. `MODE_FLOAT'
  964.      floating point modes.  By default these are `SFmode', `DFmode',
  965.      `XFmode' and `TFmode'.
  966.  
  967. `MODE_COMPLEX_INT'
  968.      Complex integer modes.  (These are not currently implemented).
  969.  
  970. `MODE_COMPLEX_FLOAT'
  971.      Complex floating point modes.  By default these are `SCmode',
  972.      `DCmode', `XCmode', and `TCmode'.
  973.  
  974. `MODE_FUNCTION'
  975.      Algol or Pascal function variables including a static chain.
  976.      (These are not currently implemented).
  977.  
  978. `MODE_CC'
  979.      Modes representing condition code values.  These are `CCmode' plus
  980.      any modes listed in the `EXTRA_CC_MODES' macro.  *Note Jump
  981.      Patterns::, also see *Note Condition Code::.
  982.  
  983. `MODE_RANDOM'
  984.      This is a catchall mode class for modes which don't fit into the
  985.      above classes.  Currently `VOIDmode' and `BLKmode' are in
  986.      `MODE_RANDOM'.
  987.  
  988.    Here are some C macros that relate to machine modes:
  989.  
  990. `GET_MODE (X)'
  991.      Returns the machine mode of the RTX X.
  992.  
  993. `PUT_MODE (X, NEWMODE)'
  994.      Alters the machine mode of the RTX X to be NEWMODE.
  995.  
  996. `NUM_MACHINE_MODES'
  997.      Stands for the number of machine modes available on the target
  998.      machine.  This is one greater than the largest numeric value of any
  999.      machine mode.
  1000.  
  1001. `GET_MODE_NAME (M)'
  1002.      Returns the name of mode M as a string.
  1003.  
  1004. `GET_MODE_CLASS (M)'
  1005.      Returns the mode class of mode M.
  1006.  
  1007. `GET_MODE_WIDER_MODE (M)'
  1008.      Returns the next wider natural mode.  For example, the expression
  1009.      `GET_MODE_WIDER_MODE (QImode)' returns `HImode'.
  1010.  
  1011. `GET_MODE_SIZE (M)'
  1012.      Returns the size in bytes of a datum of mode M.
  1013.  
  1014. `GET_MODE_BITSIZE (M)'
  1015.      Returns the size in bits of a datum of mode M.
  1016.  
  1017. `GET_MODE_MASK (M)'
  1018.      Returns a bitmask containing 1 for all bits in a word that fit
  1019.      within mode M.  This macro can only be used for modes whose
  1020.      bitsize is less than or equal to `HOST_BITS_PER_INT'.
  1021.  
  1022. `GET_MODE_ALIGNMENT (M))'
  1023.      Return the required alignment, in bits, for an object of mode M.
  1024.  
  1025. `GET_MODE_UNIT_SIZE (M)'
  1026.      Returns the size in bytes of the subunits of a datum of mode M.
  1027.      This is the same as `GET_MODE_SIZE' except in the case of complex
  1028.      modes.  For them, the unit size is the size of the real or
  1029.      imaginary part.
  1030.  
  1031. `GET_MODE_NUNITS (M)'
  1032.      Returns the number of units contained in a mode, i.e.,
  1033.      `GET_MODE_SIZE' divided by `GET_MODE_UNIT_SIZE'.
  1034.  
  1035. `GET_CLASS_NARROWEST_MODE (C)'
  1036.      Returns the narrowest mode in mode class C.
  1037.  
  1038.    The global variables `byte_mode' and `word_mode' contain modes whose
  1039. classes are `MODE_INT' and whose bitsizes are either `BITS_PER_UNIT' or
  1040. `BITS_PER_WORD', respectively.  On 32-bit machines, these are `QImode'
  1041. and `SImode', respectively.
  1042.  
  1043. File: gcc.info,  Node: Constants,  Next: Regs and Memory,  Prev: Machine Modes,  Up: RTL
  1044.  
  1045. Constant Expression Types
  1046. =========================
  1047.  
  1048.    The simplest RTL expressions are those that represent constant
  1049. values.
  1050.  
  1051. `(const_int I)'
  1052.      This type of expression represents the integer value I.  I is
  1053.      customarily accessed with the macro `INTVAL' as in `INTVAL (EXP)',
  1054.      which is equivalent to `XWINT (EXP, 0)'.
  1055.  
  1056.      There is only one expression object for the integer value zero; it
  1057.      is the value of the variable `const0_rtx'.  Likewise, the only
  1058.      expression for integer value one is found in `const1_rtx', the only
  1059.      expression for integer value two is found in `const2_rtx', and the
  1060.      only expression for integer value negative one is found in
  1061.      `constm1_rtx'.  Any attempt to create an expression of code
  1062.      `const_int' and value zero, one, two or negative one will return
  1063.      `const0_rtx', `const1_rtx', `const2_rtx' or `constm1_rtx' as
  1064.      appropriate.
  1065.  
  1066.      Similarly, there is only one object for the integer whose value is
  1067.      `STORE_FLAG_VALUE'.  It is found in `const_true_rtx'.  If
  1068.      `STORE_FLAG_VALUE' is one, `const_true_rtx' and `const1_rtx' will
  1069.      point to the same object.  If `STORE_FLAG_VALUE' is -1,
  1070.      `const_true_rtx' and `constm1_rtx' will point to the same object.
  1071.  
  1072. `(const_double:M ADDR I0 I1 ...)'
  1073.      Represents either a floating-point constant of mode M or an
  1074.      integer constant too large to fit into `HOST_BITS_PER_WIDE_INT'
  1075.      bits but small enough to fit within twice that number of bits (GNU
  1076.      CC does not provide a mechanism to represent even larger
  1077.      constants).  In the latter case, M will be `VOIDmode'.
  1078.  
  1079.      ADDR is used to contain the `mem' expression that corresponds to
  1080.      the location in memory that at which the constant can be found.  If
  1081.      it has not been allocated a memory location, but is on the chain
  1082.      of all `const_double' expressions in this compilation (maintained
  1083.      using an undisplayed field), ADDR contains `const0_rtx'.  If it is
  1084.      not on the chain, ADDR contains `cc0_rtx'.  ADDR is customarily
  1085.      accessed with the macro `CONST_DOUBLE_MEM' and the chain field via
  1086.      `CONST_DOUBLE_CHAIN'.
  1087.  
  1088.      If M is `VOIDmode', the bits of the value are stored in I0 and I1.
  1089.      I0 is customarily accessed with the macro `CONST_DOUBLE_LOW' and
  1090.      I1 with `CONST_DOUBLE_HIGH'.
  1091.  
  1092.      If the constant is floating point (regardless of its precision),
  1093.      then the number of integers used to store the value depends on the
  1094.      size of `REAL_VALUE_TYPE' (*note Cross-compilation::.).  The
  1095.      integers represent a floating point number, but not precisely in
  1096.      the target machine's or host machine's floating point format.  To
  1097.      convert them to the precise bit pattern used by the target
  1098.      machine, use the macro `REAL_VALUE_TO_TARGET_DOUBLE' and friends
  1099.      (*note Data Output::.).
  1100.  
  1101.      The macro `CONST0_RTX (MODE)' refers to an expression with value 0
  1102.      in mode MODE.  If mode MODE is of mode class `MODE_INT', it
  1103.      returns `const0_rtx'.  Otherwise, it returns a `CONST_DOUBLE'
  1104.      expression in mode MODE.  Similarly, the macro `CONST1_RTX (MODE)'
  1105.      refers to an expression with value 1 in mode MODE and similarly
  1106.      for `CONST2_RTX'.
  1107.  
  1108. `(const_string STR)'
  1109.      Represents a constant string with value STR.  Currently this is
  1110.      used only for insn attributes (*note Insn Attributes::.) since
  1111.      constant strings in C are placed in memory.
  1112.  
  1113. `(symbol_ref:MODE SYMBOL)'
  1114.      Represents the value of an assembler label for data.  SYMBOL is a
  1115.      string that describes the name of the assembler label.  If it
  1116.      starts with a `*', the label is the rest of SYMBOL not including
  1117.      the `*'.  Otherwise, the label is SYMBOL, usually prefixed with
  1118.      `_'.
  1119.  
  1120.      The `symbol_ref' contains a mode, which is usually `Pmode'.
  1121.      Usually that is the only mode for which a symbol is directly valid.
  1122.  
  1123. `(label_ref LABEL)'
  1124.      Represents the value of an assembler label for code.  It contains
  1125.      one operand, an expression, which must be a `code_label' that
  1126.      appears in the instruction sequence to identify the place where
  1127.      the label should go.
  1128.  
  1129.      The reason for using a distinct expression type for code label
  1130.      references is so that jump optimization can distinguish them.
  1131.  
  1132. `(const:M EXP)'
  1133.      Represents a constant that is the result of an assembly-time
  1134.      arithmetic computation.  The operand, EXP, is an expression that
  1135.      contains only constants (`const_int', `symbol_ref' and `label_ref'
  1136.      expressions) combined with `plus' and `minus'.  However, not all
  1137.      combinations are valid, since the assembler cannot do arbitrary
  1138.      arithmetic on relocatable symbols.
  1139.  
  1140.      M should be `Pmode'.
  1141.  
  1142. `(high:M EXP)'
  1143.      Represents the high-order bits of EXP, usually a `symbol_ref'.
  1144.      The number of bits is machine-dependent and is normally the number
  1145.      of bits specified in an instruction that initializes the high
  1146.      order bits of a register.  It is used with `lo_sum' to represent
  1147.      the typical two-instruction sequence used in RISC machines to
  1148.      reference a global memory location.
  1149.  
  1150.      M should be `Pmode'.
  1151.  
  1152.